﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SELF.Controls
{
    public partial class frm_browser_reserv : Form
    {
        public frm_browser_reserv()
        {
            InitializeComponent();
        }

        private void init()
        {

        }

        private void panel1_Click(object sender, EventArgs e)
        {
            MessageBoxCustom mesg = new MessageBoxCustom("ต้องการออกจากหน้าจองเรียนหรือไม่",0);
            if(mesg.ShowDialog() == DialogResult.OK)
            {
                this.Close();
            }
        }

        private void panel2_Click(object sender, EventArgs e)
        {
            this.Close();
            this.Dispose();
        }

        private void frm_browser_reserv_Load(object sender, EventArgs e)
        {
            webBrowser1.Navigate("http://booking.jigsawenglish.com/Login/index.html");
            Timer tmEnd = new Timer();
            tmEnd.Interval = 1000;
            tmEnd.Tick += new EventHandler(tmEnd_Tick);
        }

        void tmEnd_Tick(object sender, EventArgs e)
        {
            if (SELF.cGobal.EndOfReserv == true)
            {
                this.Close();
            }
            //throw new NotImplementedException();
        }

    }
}
